<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <script>
      function getSum(x, y) {
        return x + y
        //返回值返回给了谁？ 函数的调用者  getSum(1,2)
        //  getSum(1,2 )  = 3
      }
      // let num = parseInt('12px')
      let result = getSum(1, 2)
      // console.log(num)
      console.log(result)

      //2.参数不匹配
      function fn(a, b) {
        console.log(a + b)
      }
      // 1.实参多于形参  剩余的实参不参与运算
      // fn(1, 2, 3)

      //2.实参少于形参
      fn(1) // 1 + undefined = NaN
    </script>
  </body>
</html>
